#ifndef VFSCALL_H
#define VFSCALL_H

#include "vfs.h"

#define VFS_MAX_PATH_LEN	512

/*
struct file
{
	
};

/*
904         union {
905                 struct list_head        fu_list;
906                 struct rcu_head         fu_rcuhead;
907         } f_u;
908         struct path             f_path;
909 #define f_dentry        f_path.dentry
910 #define f_vfsmnt        f_path.mnt
911         const struct file_operations    *f_op;
912         spinlock_t              f_lock;  
913         atomic_long_t           f_count;
914         unsigned int            f_flags;
915         fmode_t                 f_mode;
916         loff_t                  f_pos;
917         struct fown_struct      f_owner;
918         const struct cred       *f_cred;
919         struct file_ra_state    f_ra;
920 
921         u64                     f_version;
926         void                    *private_data;
932         struct address_space    *f_mapping;
*/


typedef struct fs_opened_file_p
{
	char path[VFS_MAX_PATH_LEN];
	uint32_t mod;
	
	struct fs_opened_file_p *next;
} fs_opened_file_t;

struct stat
{
	
};

struct diren
{
	char name[VFS_NODE_NAME_LEN];
	uint32_t inode;
};

int32_t fs_fopen(char *, char *);
void fs_fclose(int32_t);
int fs_fwrite(int32_t, int32_t, char *);
int fs_fread(int32_t, int32_t, char *);
void fs_fstat(int32_t, struct stat *);
int fs_freaddir(int32_t, struct diren *, int32_t);

int fs_remove(char *);
int fs_link(char *, char *);
int fs_unlink(char *);
int fs_mount(char *, char *, char *);
int fs_umount(char *);
int fs_makedir(char *);
void fs_stat(char *, struct stat *);
int fs_set_stat(char *, struct stat *);


#endif
